home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / pwlitea.zip / LITEDISK.BAT < prev    next >
DOS Batch File  |  1990-01-26  |  7KB  |  218 lines

  1. echo off
  2. rem :e :f :o :q
  3. echo Making PC-Write Lite Work Disk
  4. echo This WON'T change CONFIG.SYS or AUTOEXEC.BAT files
  5. echo CONFIG.SYS needs FILES=9 or more for some features
  6. echo .
  7. rem getyn √ gives error, rets 1 for:
  8. rem 1. using DOS 3.0
  9. rem 2. %1 not ends in \ or :
  10. rem 3. under 40 bytes in environment
  11. rem getym ≡B0 rets 0 iff %%B = 0
  12. rem getyn ε f rets 0 iff file exists
  13. rem getyn ÷ d rets 0 iff def drive not d
  14. getyn √L \%1
  15. if errorlevel 1 goto z
  16.  
  17. set b=0
  18. getyn Do you want to make backup copies of your Lite disks now?
  19. if not errorlevel 1 goto g
  20. set b=1
  21. getyn Type Y to make 5.25 inch floppy disks, N to make 3.5 inch
  22. if errorlevel 1 set b=2
  23. getyn Do you have %b% blank, formatted disks ready, for backups?
  24. if not errorlevel 1 goto z
  25. getyn Does your computer have at least two floppy disk DRIVES?
  26. if errorlevel 1 goto e
  27. echo To make backups, please use the DOS command: DISKCOPY.
  28. echo We won't make backups as part of this install process.
  29. set b=0
  30. goto g
  31. :e
  32. set d=%2
  33. if %2x==x set d=B:
  34. getyn ÷ %d%
  35. if errorlevel 1 goto x
  36. getyn Backups will be made on drive %d%, ok?
  37. if not errorlevel 1 goto y
  38.  
  39. :g
  40. echo .
  41. set w=1
  42. set t=%1
  43. getyn Type Y if installing to hard disk, or N if to floppy disk
  44. if errorlevel 1 goto h
  45. getyn Do you have one blank, formatted disk for your work disk?
  46. if not errorlevel 1 goto z
  47. if %1x==x set t=B:
  48. getyn ÷ %t%
  49. if errorlevel 1 goto x
  50. getyn Your work disk will be made on drive %t%, ok?
  51. if not errorlevel 1 goto y
  52. goto i
  53.  
  54. :h
  55. set w=0
  56. if not %1x==x goto c
  57. getyn Your work directory will be C:\PCW\, ok? Type Y if unsure
  58. if errorlevel 1 goto k
  59. echo Enter command like LITEDISK C:\PCW\ to select directory
  60. goto z
  61. :k
  62. echo If C:\PCW\ exists, ignore "unable to create" message
  63. echo on
  64. mkdir C:\PCW
  65. echo off
  66. set t=c:\pcw\
  67. goto i
  68. :c
  69. getyn Your work directory will be %t%, ok?
  70. if not errorlevel 1 goto z
  71.  
  72. :i
  73. echo .
  74. if exist lite.exe goto r
  75. getyn Insert PC-Write Lite Program disk in default drive, type Y
  76. if not errorlevel 1 goto z
  77. goto i
  78. :r
  79. getyn ≡B0
  80. if errorlevel 1 goto u
  81. getyn Insert blank disk for Program Disk backup in drive %d%, type Y
  82. if not errorlevel 1 goto u
  83. echo on
  84. copy *.* %d%
  85. echo off
  86. :u
  87. getyn ≡W0
  88. if errorlevel 1 goto v
  89. getyn Insert blank disk to be the Work Disk in drive %t%, type Y
  90. if not errorlevel 1 goto z
  91.  
  92. :v
  93. copy getyn.com %t%()
  94. getyn ε %t%()
  95. if errorlevel 1 goto l
  96. echo Cannot copy files to %t%; have to cancel LITEDISK;
  97. echo Check that %t% is big enough, not write-protected;
  98. echo If %t% is directory, make sure it ends with a "\";
  99. echo If it doesn't exist, use MKDIR %t% command WITHOUT
  100. echo final "\" to create it; for example:  MKDIR C:\PCW
  101. goto z
  102. :l
  103. del %t%()
  104. echo .
  105. getyn Do you want the PC-Write Lite program?   Type Y if unsure
  106. if errorlevel 1 copy lite.exe %t%lite.exe
  107. getyn Do you want the PC-Write Lite Help file? Type Y if unsure
  108. if errorlevel 1 copy lite.hlp %t%lite.hlp
  109. echo If you already have a Full PC-Write edit control file,
  110. echo you don't need to make one now; that one will work OK.
  111. getyn Do you want the Lite Edit Control File?  Type Y if unsure
  112. if not errorlevel 1 goto p
  113. copy ed.def %t%ed.def
  114. getyn Do you have the old Tandy 1000 keyboard? Type N if unsure
  115. if not errorlevel 1 goto d
  116. copy ed.trs %t%ed.def
  117. echo Old Tandy keyboards are not standard.
  118. goto s
  119. :d
  120. getyn Is your keyboard sometimes incompatible? Type N if unsure
  121. if not errorlevel 1 goto t
  122. copy ed.spc %t%ed.def
  123. echo The file ED.SPC has commands that may help.
  124. :s
  125. echo You need to substitute some keys, such as Ctl-V for
  126. echo Scroll Lock. Type the file ED.DEF for a complete list
  127. :t
  128. getyn Do you want to edit on a color monitor?  Type N if unsure
  129. if errorlevel 1 echo %%C>>%t%ed.def
  130. getyn Do you want the three reminder lines on? Type Y if unsure
  131. if errorlevel 1 echo %%M>>%t%ed.def
  132. getyn Do you want automatic save every 5 min.? Type Y if unsure
  133. if errorlevel 1 echo %%R] &R:5>>%t%ed.def
  134. getyn Do you want spell checking, as you type? Type N if unsure
  135. if errorlevel 1 echo 400:361,321>>%t%ed.def
  136. :p
  137. echo .
  138. getyn Do you want to have a "PIF" file for Windows or DesqView?
  139. if errorlevel 1 copy lite.pif %t%lite.pif
  140. echo The master word list is a large (110 KB) file used to check spelling.
  141. echo Your computer must have at least 448 KB to use this master word list.
  142. echo If you already have a Full PC-Write master word list, it will work OK.
  143. getyn Do you want this master word list?  Type Y if unsure.
  144. if errorlevel 1 copy words.mas %t%words.mas
  145.  
  146. echo .
  147. :n
  148. if exist printer.exe goto m
  149. getyn Do you have a copy of the PC-Write Lite Utility disk?
  150. if errorlevel 1 goto a
  151. echo Without the utility diskette, you can't print effects like
  152. echo bold and underline, but you can edit and do basic printing.
  153. goto z
  154. :a
  155. getyn Insert PC-Write Lite Utility diskette in default drive, type Y
  156. if not errorlevel 1 goto z
  157. goto n
  158.  
  159. :m
  160. getyn Do you want the tutorial practice files?  Type Y if unsure
  161. if not errorlevel 1 goto q
  162. echo on
  163. copy *. %t%*.
  164. echo off
  165. :q
  166. getyn Do you want the two print testing files?  Type Y if unsure
  167. if not errorlevel 1 goto b
  168. copy chars.tst %t%chars.tst
  169. copy print.tst %t%print.tst
  170. :b
  171. echo .
  172. echo If you already have a Full PC-Write print control file,
  173. echo you don't need to make one now;  that one will work OK.
  174. getyn Do you want to make a Print Control File? Type Y if unsure
  175. if errorlevel 1 printer %t%pr.def
  176. echo .
  177. getyn ≡B2
  178. if not errorlevel 1 goto j
  179. getyn Insert blank disk for Utility Disk backup in drive %d%, type Y.
  180. if not errorlevel 1 goto j
  181. echo on
  182. copy *.* %d%
  183. echo off
  184. :j
  185. echo .
  186. echo Your PC-Write Lite Work Disk Is Now Complete
  187. echo .
  188. echo Leave the Utility disk in the default drive to
  189. echo type and/or print the Tutorial and Quick Guide.
  190. echo Then place all original and backup diskettes in a safe place.
  191. set t=
  192. set d=
  193. set b=
  194. set w=
  195. getyn Do you want to type and/or print the Tutorial and Quick Guide?
  196. if not errorlevel 1 goto z
  197. echo Note: Type Ctl-C at any time to stop typing or printing.
  198. getyn Do you want to see them on your screen?
  199. if not errorlevel 1 goto w
  200. typeman
  201. :w
  202. getyn Do you want to print the Tutorial and Quick Guide?
  203. if not errorlevel 1 goto z
  204. getyn Is your printer ready, with 92 pages of paper?
  205. if not errorlevel 1 goto z
  206. printman
  207. goto z
  208. :x
  209. echo Cannot make work disk or backups on same drive that LITEDISK uses.
  210. :y
  211. echo Enter command like "LITEDISK C:\PCW\ A:" or "LITEDISK B: B:" where
  212. echo first name is place for work disk, second is the drive for backups
  213. :z
  214. set t=
  215. set d=
  216. set b=
  217. set w=
  218.